<template>
  <div id="app" :style="{ minHeight: appHeight }">

    <router-view />
  </div>
</template>

<script>
export default {
  name: 'App',
  data() {
    return {
      appHeight: window.innerHeight + 'px',
      screenWidth: document.body.clientWidth,//初始化宽度
      timer:''
    }
  },
  created() {
  },
  mounted() {
    var _this = this
    window.onresize = () => {
      return (() => {
        _this.screenWidth = document.body.clientWidth
      })()
    }
    if (this.screenWidth <= 900) {
      this.$router.push('customerConsultation')
    } else {
      this.$router.push('PCchatInterface')
    }
  },
  watch: {

  }

}
</script>

<style lang='scss'>
* {
  padding: 0;
  margin: 0px;
}

#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  // text-align: center;
  color: #2c3e50;
}

@import "./assets/index.scss";
</style>
